Field of the Invention
The present invention relates to a measurement apparatus for measuring at least one of the position and attitude of a work, a system, a measurement method, a determination method, and a non-transitory computer-readable storage medium.
Description of the Related Art
In recent years, a robot increasingly performs a complex task such as the assembly process of an industrial product, which has been conventionally done by a human. The robot performs assembly by gripping a part using an end effecter such as a hand. To implement such assembly, it is necessary to measure the position and attitude of an article (work) to be gripped.
For example, there is known a technique of measuring the position and attitude of a work by model fitting using measurement information (distance point group data) obtained from a range image. As a technique of obtaining a range image, there is generally known an active stereo method of irradiating a work with light having a pattern (projecting light having a pattern onto a work), capturing the pattern from a direction different from the irradiation direction of the light, and applying the principle of triangulation.
In the active stereo method, a pattern in an image is distorted due to luminance unevenness when capturing the pattern with which the work is irradiated, thereby causing a measurement error (distance measurement error). For example, shape unevenness is generated on the surface of a resin housing included in the work at the time of injection molding, thereby generating luminance unevenness on the work.
Techniques of correcting the distortion of a pattern caused by luminance unevenness are proposed in Japanese Patent Laid-Open Nos. 3-289505 and 2008-241483. In the technique disclosed in Japanese Patent Laid-Open No. 3-289505, a work is individually irradiated with light having a pattern and light having no pattern, thereby obtaining a pattern image corresponding to the light having the pattern and a total irradiation image corresponding to the light having no pattern. The distortion of the pattern caused by the luminance unevenness is corrected by correcting luminance unevenness in the pattern image by luminance unevenness in the total irradiation image. In the technique disclosed in Japanese Patent Laid-Open No. 2008-241483, a correction amount is determined in advance by obtaining the distortion of the pattern caused by the luminance unevenness, and is used to correct the distortion of the pattern at the time of actual measurement.
If the position and attitude of a work are measured while moving a robot to speed up the assembly process, it is necessary to obtain one range image by one image capturing operation.
However, in the technique disclosed in Japanese Patent Laid-Open No. 3-289505, to obtain one range image, it is necessary to perform an image capturing operation at least twice to obtain a pattern image and a total irradiation image (an image for luminance unevenness correction), and thus the timings of obtaining the respective images shift from each other. Consequently, a field shift occurs between the pattern image and the total irradiation image, and it is impossible to implement high-accuracy correction of the distortion of the pattern caused by the luminance unevenness. In addition, the distortion of the pattern caused by the luminance unevenness unwantedly changes depending on the irradiation direction of the pattern for the work.
On the other hand, in the technique disclosed in Japanese Patent Laid-Open No. 2008-241483, since the correction amount is determined in advance by obtaining the distortion of the pattern caused by the luminance unevenness, this technique is appropriate when the position and attitude of the work remain unchanged with respect to a measurement apparatus but is difficult to apply when the position and attitude of the work arbitrarily change.